Use Profiler::instance() instead of $wgProfiler
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 21 Apr 2011 15:53:25 +0000 (15:53 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 21 Apr 2011 15:53:25 +0000 (15:53 +0000)
includes/SkinTemplate.php

index 3f106c5..490621a 100644 (file)
@@ -140,12 +140,10 @@ class SkinTemplate extends Skin {
                global $wgMaxCredits, $wgShowCreditsIfMax;
                global $wgPageShowWatchingUsers;
                global $wgUseTrackbacks, $wgUseSiteJs, $wgDebugComments;
-               global $wgArticlePath, $wgScriptPath, $wgServer, $wgProfiler;
+               global $wgArticlePath, $wgScriptPath, $wgServer;
 
                wfProfileIn( __METHOD__ );
-               if ( is_object( $wgProfiler ) ) {
-                       $wgProfiler->setTemplated( true );
-               }
+               Profiler::instance()->setTemplated( true );
 
                $oldid = $wgRequest->getVal( 'oldid' );
                $diff = $wgRequest->getVal( 'diff' );